// ==UserScript==
// @name         Enable Share for BITNetdisk
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Enables "Share" and "My Shares" in BITNetdisk
// @author       Chen Kangbing
// @match        http://pan.bit.edu.cn/*
// @match        https://webvpn.bit.edu.cn/http/77726476706e69737468656265737421e0f64fd225397c1e7b0c9ce29b5b/*
// @grant        none
// ==/UserScript==

function usrMain() {
    'use strict';
    //alert(1);
    document.getElementsByClassName("shares")[0].style.display = "block";
    document.getElementsByClassName("item share")[1].style.display = "block";
    // Your code here...
}

var pageURLCheckTimer = setInterval(
    function () {
        if (this.lastHref !== location.href ||
            this.lastHref === null)
        {
            console.log(1);
            this.lastHref = location.href;
            usrMain();
        }
    }
    , 500
);

//setTimeout(usrMain, 1000);